package org.jtb.quickr;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

abstract class MethodRequest extends FlickrRequest {
    private String method;
    
    public MethodRequest(String baseUrl, String apiKey, String method) {
        super(baseUrl, apiKey);
        setMethod(method);
    }
    
    public abstract FlickrResponse execute() throws QuickrException;
            
    protected Map<String,String> getArgs() {
        putArg("method", getMethod());
        
        return super.getArgs();
    }

    protected String getMethod() {
        return method;
    }

    private void setMethod(String method) {
        this.method = method;
    }
}
